<script>
import { GlLink } from '@gitlab/ui';
import SeverityBadge from 'ee/vue_shared/security_reports/components/severity_badge.vue';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';

export default {
  name: 'DependencyVulnerability',
  components: {
    SeverityBadge,
    GlLink,
  },
  mixins: [glFeatureFlagMixin()],
  props: {
    vulnerability: {
      type: Object,
      required: true,
    },
  },
};
</script>

<template>
  <div class="d-flex align-items-baseline">
    <div class="w-8em flex-shrink-0 text-right mr-3">
      <severity-badge :severity="vulnerability.severity" />
    </div>
    <gl-link :href="vulnerability.url">{{ vulnerability.name }}</gl-link>
  </div>
</template>
